package tgc.edu.ljc.bootstrap.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.SessionAttributes;

@Controller
@SessionAttributes(value = {"user"})
public class MainController {
	
	@RequestMapping(value = {"/","/login"},method = RequestMethod.GET)
	public String login() {
		return "login"; 
	}
	@RequestMapping(value = "/main2")
	public String main2() {
		return "redirect:main";
	}
	@RequestMapping(value = "/main")
	public String main() {
		return "main";
	}
	
	@RequestMapping(value = "/stuMain")
	public String stuMain() {
		return "stuMain";
	}
	
	/*
	 * @RequestMapping(value = "/logout") public String logout(ModelMap
	 * modelMap,HttpServletRequest request) { modelMap.remove("user"); HttpSession
	 * session = request.getSession(); session.removeAttribute("user"); return
	 * "redirect:login"; }
	 */
}
